<?php
/**
 * 
 * @author tanaka
 * @package 
 * @subpackage
 */
class MypageController extends Controller_Action_FrontAuth
{
	public function indexAction()
	{
		$dbMovie = new Db_Table_TMovie();
		$movieList = $dbMovie->getAllSelfUploadMovies($this->_loginUser);
		
		$this->view->uploadList = $movieList;
	}
	
	
	public function convertAction()
	{
		if(!_DEBUG){
			return $this->_throw404Error();
		}
		
		$id = $this->_getParam('movie_id');
		
		$command = "php " . APPLICATION_PATH . "/batch/encode_flv_movie.php {$id} > /dev/null &"; 
		exec($command);
		
		$this->_redirect('/mypage');
	}
}